/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>Project: jse2303 - List2
 * <p>Powered by webrx On 2023-07-19 10:44:37
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class List2 {
    public static void main(String[] args) {
        //List<Integer> list = new ArrayList<Integer>();
        //var list = new ArrayList<Integer>();
        long ss = System.currentTimeMillis();

        //List<int> aa = new ArrayList<>();

        ArrayList<Integer> list1 = new ArrayList<>();
        for (int i = 0; i < 1000000; i++) {
            list1.add(i);
        }
        long ee = System.currentTimeMillis();
        System.out.println(ee - ss);


        ss = System.currentTimeMillis();
        List<Integer> list2 = new ArrayList<>();
        for (int i = 0; i < 1000000; i++) {
            list2.add(i);
        }
        ee = System.currentTimeMillis();
        System.out.println(ee - ss);
    }
}
